<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>运行时配置</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="filter.installation.html">安装</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="filter.resources.html">资源类型</a></div>
 <div class="up"><a href="filter.setup.html">安装／配置</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="filter.configuration" class="section">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>Filter Configuration Options</strong></caption>
   
    <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="filter.configuration.html#ini.filter.default" class="link">filter.default</a></td>
      <td>&quot;unsafe_raw&quot;</td>
      <td>PHP_INI_PERDIR</td>
      <td>PHP_INI_ALL in filter &lt;= 0.9.4. Available since PHP 5.2.0.</td>
     </tr>

     <tr>
      <td><a href="filter.configuration.html#ini.filter.default-flags" class="link">filter.default_flags</a></td>
      <td>NULL</td>
      <td>PHP_INI_PERDIR</td>
      <td>PHP_INI_ALL in filter &lt;= 0.9.4. Available since PHP 5.2.0.</td>
     </tr>

    </tbody>
   
  </table>

  有关 PHP_INI_* 样式的更多详情与定义，见 <a href="configuration.changes.modes.html" class="xref">配置可被设定范围</a>。
</p>

<p class="para">这是配置指令的简短说明。</p>

<p class="para">
 <dl>

  
   <dt id="ini.filter.default">
    <em><code class="parameter">filter.default</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </dt>

   <dd>

    <p class="para">
     Filter all <var class="varname"><var class="varname"><a href="reserved.variables.get.html" class="classname">$_GET</a></var></var>, <var class="varname"><var class="varname"><a href="reserved.variables.post.html" class="classname">$_POST</a></var></var>,
     <var class="varname"><var class="varname"><a href="reserved.variables.cookies.html" class="classname">$_COOKIE</a></var></var>,  <var class="varname"><var class="varname"><a href="reserved.variables.request.html" class="classname">$_REQUEST</a></var></var> and
     <var class="varname"><var class="varname"><a href="reserved.variables.server.html" class="classname">$_SERVER</a></var></var> data by this filter.
     Original data can be accessed through <span class="function"><a href="function.filter-input.html" class="function">filter_input()</a></span>.
    </p>
    <p class="para">
     Accepts the name of the filter you like to use by default. See the
     existing <a href="filter.filters.html" class="link">filter list</a> for the list
     of the filter names.
    </p>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
      <p class="para">
        Be careful about the default flags for the default filters. You should explicitly 
        set them to the value you want. For example, to configure the default filter to
        behave exactly like <span class="function"><a href="function.htmlspecialchars.html" class="function">htmlspecialchars()</a></span> you need to set them
        default flags to 0 as shown below.
      </p>
      <p class="para">
        <div class="example" id="example-4986">
          <p><strong>Example #1 Configuring the default filter to act like htmlspecialchars</strong></p>
          <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
filter.default&nbsp;=&nbsp;full_special_chars<br />filter.default_flags&nbsp;=&nbsp;0</span>
</code></div>
          </div>

        </div>
      </p>
   </p></blockquote>
   </dd>

  
  
  
   <dt id="ini.filter.default-flags">
    <em><code class="parameter">filter.default_flags</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </dt>

   <dd>

    <p class="para">
     Default flags to apply when the default filter is set. This is set to 
     <strong><code>FILTER_FLAG_NO_ENCODE_QUOTES</code></strong> by default for backwards
     compatibility reasons.  See the <a href="filter.filters.flags.html" class="link">flag list</a>
     for the list of all the flag names.
    </p>
   </dd>

  
  
 </dl>

 </p>
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="filter.installation.html">安装</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="filter.resources.html">资源类型</a></div>
 <div class="up"><a href="filter.setup.html">安装／配置</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
